#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int len(char* s){
	int i = -1;
	while(i++, s[i]!='\0');
	return i++;
}
char *ltrim(char *str) {
	//int length = strlen(str);
	char *i, *end;
	int length = len(str), n = 0;
	i = str, end = str + length;
	for(; i<end; i++){
		if(*i == ' ' || *i == '\t' || *i == '\n'){
			n ++;
		}else{
			break;
		}
	}
	/*
	for(m=0; m<=length-n; m++){
		*(str + m) = *(str + n + m);
	}
	*/
	strncpy(str, str+n, length-n);
	str[length-n] = '\0';
	return str;
}
char *rtrim(char *str){
	char *i;
	//i = str + strlen(str) - 1;
	i = str + len(str) - 1;
	for(; i>=str; i--){
		if(*i == ' ' || *i == '\t' || *i == '\n'){
			*(str + strlen(str) -1) = '\0';
		}else{
			break;
		}
	}
	return str;
}

int main(int argc, char** argv){
	char s[2048], ret[1048576];
	char *p;
	int oft = 0;
	int show = argc>1 ? strcmp(argv[1],"show") : 111;
	if(show && show!=111){
		printf("Parameter error!\n\n");
		return -1;
	}
	if(show){
		oft += sprintf(ret+oft,"%s ","svn add");
	}
	while(fgets(s, 1048576, stdin)){
		p = strtok(s, "\n");
		p = strtok(s, " ");
		if(*p=='?'){
			p = strtok(NULL, "\n");
			p = ltrim(p);
			if(show){
				oft += sprintf(ret+oft,"\"%s\" ",p);
			}else{
				oft += sprintf(ret+oft,"%s\n",p);
			}
		}
	}
	if(show){
		printf("%s\n\n", ret);
		system(ret);
	}else{
		printf("%s", ret);
	}
	return 0;
}
